/**  
* @Title: IBlogService.java 
* @Description:
* @Copyright: Copyright (c) 2018
* @Company:http://www.sinocon.cn
* @author Administrator  
* @date 2018年3月27日  
* @version 1.0  
*/
package com.yuanlinsu.project.blog.service;

import java.util.List;
import java.util.Map;

import com.yuanlinsu.project.blog.entity.Blog;

/**
 * @Title: IBlogService
 * @Description:
 * @author:Administrator
 * @date 2018年3月27日
 */
public interface IBlogService {
	/**
	 * 获取某用户的所有blog
	 * 
	 * @Title: getBlogByUser
	 * @Description:
	 * @param u
	 * @param argmap
	 * @return
	 */
	List<Blog> getBlogByUser(String uid, Map<String, Object> argmap);

	/**
	 * 获取单篇博客
	 * 
	 * @Title: getBlogById
	 * @Description:
	 * @param b
	 * @return
	 */
	Blog getBlogById(Blog b);

	/**
	 * 根据关键字查询博客
	 * 
	 * @Title: getBlogByKey
	 * @Description:
	 * @param key
	 * @param argmap
	 * @return
	 */
	List<Blog> getBlogByKey(String key, Map<String, Object> argmap);

	/**
	 * 新增blog
	 * 
	 * @Title: addBlog
	 * @Description:
	 * @param blog
	 * @return
	 */
	Blog addBlog(Blog blog);

	/**
	 * 更新blog
	 * 
	 * @Title: updateBlog
	 * @Description:
	 * @param blog
	 * @return
	 */
	Blog updateBlog(Blog blog);

	/**
	 * 删除blog
	 * 
	 * @Title: delBlogById
	 * @Description:
	 * @param bid
	 * @return
	 */
	int delBlogById(int bid);

	/**
	 * 删除用户的Blog
	 * 
	 * @Title: delBlogByUser
	 * @Description:
	 * @param uid
	 * @return
	 */
	int delBlogByUser(int uid);
}
